﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Enterprise.Infrastructure;

namespace Enterprise.UI.Web.Modules.CaiWuBu
{
    public partial class js : System.Web.UI.Page
    {
        public int zbid =(int)Utility.sink("zbid", Utility.MethodType.Get, 0, 0, Utility.DataType.Int);
        public int year = (int)Utility.sink("year", Utility.MethodType.Get, 0, 0, Utility.DataType.Int);
        public string dw = (string)Utility.sink("dw", Utility.MethodType.Get, 0, 0, Utility.DataType.Str);
        public string showtable = (string)Utility.sink("showtable", Utility.MethodType.Get, 0, 0, Utility.DataType.Str);
        public string height = (string)Utility.sink("height", Utility.MethodType.Get, 0, 0, Utility.DataType.Str);
        public string width = (string)Utility.sink("width", Utility.MethodType.Get, 0, 0, Utility.DataType.Str);


        protected void Page_Load(object sender, EventArgs e)
        {
            
            hd_isshow.Value = showtable;

            if (height.ToInt() != null)
                hd_height.Value = height;     
           
            if (width.ToInt() != null)
                hd_width.Value = width;

            System.Data.DataSet ds = new System.Data.DataSet();
            Enterprise.Service.Caiwubu.KHBService service = new Service.Caiwubu.KHBService();
            if (zbid!=0 &&year!=0&& !string.IsNullOrEmpty(dw))
            {
                ds = service.GetDataSet("select KDW,KYEAR,KMONTH,KSJS from CWB_ZBKH where ZBID=" + zbid + " and KYEAR=" + year + " and KDW='" + dw + "' and KMONTH>0 order by KMONTH ASC");
                lthtml.Text = ds.Tables[0].ToHtmlTable();
            }
        }
    }
}